|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnegotiator.issue.Objective
negotiator.issue.Issue
negotiator.issue.IssueDiscrete
public class IssueDiscrete
Specific type of issue in which the value of the issue are a set of objects. An example of a discrete issue is the color of car with the values {Red, Blue, Black}.
| Constructor Summary | |
|---|---|
IssueDiscrete(java.lang.String name,
int issueNumber,
java.lang.String[] values)
Create a new discrete issue given the name of the issue, its unique ID, and an array of possible values. |
|
IssueDiscrete(java.lang.String name,
int issueNumber,
java.lang.String[] values,
Objective objParent)
Create a new discrete issue given the name of the issue, its unique ID, its parent, and an array of possible values. |
|
IssueDiscrete(java.lang.String name,
int issueNumber,
java.lang.String[] values,
java.lang.String[] descriptions,
Objective objParent)
Create a new discrete issue given the name of the issue, its unique ID, its parent, and an array of possible values and a description for each value. |
|
| Method Summary | |
|---|---|
void |
addValue(java.lang.String valname)
Adds a value. |
void |
addValues(java.lang.String[] valnames)
Adds values. |
boolean |
checkInRange(Value value)
Method to check if the given value is in the range specified by the issue. |
void |
clear()
Removes all values from this Issue. |
java.lang.String |
convertToString()
|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getDesc(ValueDiscrete value)
|
int |
getNumberOfValues()
|
java.lang.String |
getStringValue(int index)
|
ISSUETYPE |
getType()
This method is added for convenience. |
ValueDiscrete |
getValue(int index)
Get value by its Sting representation, null otherwise. |
int |
getValueIndex(java.lang.String value)
|
int |
getValueIndex(ValueDiscrete value)
|
java.util.List<ValueDiscrete> |
getValues()
Gives an enumeration over all values in this discrete issue. |
void |
setDesc(ValueDiscrete val,
java.lang.String desc)
Sets the desc for value val. |
negotiator.xml.SimpleElement |
toXML()
Returns a SimpleElement representation of this issue. |
| Methods inherited from class negotiator.issue.Issue |
|---|
addChild |
| Methods inherited from class negotiator.issue.Objective |
|---|
children, equalContents, getAllowsChildren, getChildAt, getChildCount, getChildren, getChildWithID, getDescription, getHighestObjectiveNr, getIndex, getName, getNumber, getObjective, getParent, getPath, getPreorderEnumeration, getPreorderIssueEnumeration, getPreorderObjectiveEnumeration, getSiblings, getUserObject, hashCode, insert, isIssue, isLeaf, isObjective, isParent, remove, remove, removeFromParent, setDescription, setName, setNumber, setParent, setUserObject, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IssueDiscrete(java.lang.String name,
int issueNumber,
java.lang.String[] values)
name - of the issue.issueNumber - uniqueID of the isue.values - which the issue may take.
public IssueDiscrete(java.lang.String name,
int issueNumber,
java.lang.String[] values,
Objective objParent)
name - of the issue.issueNumber - uniqueID of the isue.values - which the issue may take.objParent - parent objective of the issue.
public IssueDiscrete(java.lang.String name,
int issueNumber,
java.lang.String[] values,
java.lang.String[] descriptions,
Objective objParent)
name - of the issue.issueNumber - uniqueID of the isue.values - which the issue may take.descriptions - array with a description for each value.objParent - parent of the issue.| Method Detail |
|---|
public boolean equals(java.lang.Object o)
equals in class Objectivepublic int getNumberOfValues()
public ValueDiscrete getValue(int index)
index - of the value to be returned.
public java.lang.String getStringValue(int index)
index - of the value.
public int getValueIndex(java.lang.String value)
value - that is supposed to be one of the alternatives of this issue.
public int getValueIndex(ValueDiscrete value)
value - that is supposed to be one of the alternatives of this issue.
public void clear()
public void addValue(java.lang.String valname)
valname - The name of the value to add.public void addValues(java.lang.String[] valnames)
valnames - Array with names of values to add.public boolean checkInRange(Value value)
Issue
checkInRange in class Issuevalue - to be checked.
public java.util.List<ValueDiscrete> getValues()
valueDiscretepublic negotiator.xml.SimpleElement toXML()
toXML in class Issue
public void setDesc(ValueDiscrete val,
java.lang.String desc)
val. If the value doesn't exist yet in this Evaluator,
add it as well.
val - The value to have it's desc set/modifieddesc - The new desc of the value.public java.lang.String getDesc(ValueDiscrete value)
value -
public ISSUETYPE getType()
Objective
getType in class Issuepublic java.lang.String convertToString()
convertToString in class Issue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||